﻿import com.customine.api.ICustomDesign;

/**
 * @author Colin Leung
 * this is the first design, which accept a single line content
 */
//sample 
class com.customine.design.SingleLineDesign implements ICustomDesign {
	private var designFormat:String="txt=escapedMessage";
	private var textLimit:Number=Number.POSITIVE_INFINITY;
	private var swf:String;

	public var line:String; 

	public function SingleLineDesign(textLimit,swf){
		this.textLimit = textLimit;
		this.swf = swf;
	}

	public function view(design : String) {
		line = unescape(design.split("=")[1]);
	}

	public function save() : String {
		var ret:String = 'txt='+escape(this.line);
		return ret;
	}

	public function getPath() : String {
		return swf;
	}

	public function setPath(url : String) {
		swf = url;
	}
}